//
//  CKPuslichTool.h
//  chengKuanDriver
//
//  Created by admin on 16/3/22.
//  Copyright © 2016年 admin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface CKPuslichTool : NSObject

#pragma mark 获取控制器 从storyBoard
+(UIViewController *)getViewControllerFromStroyBoard:(NSString *)storyName viewID:(NSString *)viewID;
#pragma mark 创建一个圆形带有边框的图片修发图片大小/等比缩小
+(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size;
#pragma mark 创建一个圆形带有边框的图片修发图片大小
+(UIImage *) imageWithImageSimple:(UIImage*)image scaledToSize:(CGSize) newSize;
#pragma mark 创建一个圆形带有边框的图片
+(UIImage *)addSumImage:(UIImage *)image borderColor:(UIColor * )borderColor borderWith:(float )borderWith;
#pragma mark 创建一个圆形带有边框的图片  控制大小
+(UIImage *)addSumImage:(UIImage *)image borderColor:(UIColor *)borderColor borderWith:(float )borderWith
                   size:(CGSize )size;

//等比缩小
+(UIImage *) imageWithImagePaperSimple:(UIImage*)image NScale:(float) nScale  maxW:(float)max;
void UIViewSetRadius(UIView *targetView ,CGFloat radius, CGFloat borderWidth, UIColor *borderColor);
/**
 *  获取带虚线边框的图片
 *
 *  @param
 */
+(UIImage*)imageWithSize:(CGSize)size borderColor:(UIColor *)color borderWidth:(CGFloat)borderWidth;
#pragma mark -字符串判空
+(BOOL)isNilOrNull:(id)obj;

#pragma mark -对分割线处理
+(void)configRealTableView:(UITableView *)tableview;

#pragma mark -将文件size转成KB、MB、GB
- (id)transformedValue:(id)value;

#pragma mark -旋转图片
+ (UIImage *)image:(UIImage *)image rotation:(UIImageOrientation)orientation;

#pragma mark// 判断文件是否存在
+ (BOOL)isFileExistsAtPath:(NSString *)filePath;

#pragma mark 判断目录是否存在
+ (BOOL)isFileExistsAtPath:(NSString *)filePath isDirectory:(BOOL *)isDirectory;

#pragma mark 删除本地存储的文件或文件夹
+ (void)deleteFileOrDirectoryForPath:(NSString *)pathString;



#pragma mark -自定义字符串转化为时间
+ (NSDate*)dateFromCustomString:(NSString*)str format:(NSString*)formatStr;

#pragma mark -时间转化为自定义字符串
+ (NSString*)stringFromCustomFormatDate:(NSDate*)date format:(NSString*)formatStr;

@end
